class ScopeFiltersController < ApplicationController
  # GET /scope_filters
  # GET /scope_filters.xml
  def index
    @scope_filters = ScopeFilter.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @scope_filters }
    end
  end

  # GET /scope_filters/1
  # GET /scope_filters/1.xml
  def show
    @scope_filter = ScopeFilter.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @scope_filter }
    end
  end

  # GET /scope_filters/new
  # GET /scope_filters/new.xml
  def new
    @scope_filter = ScopeFilter.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @scope_filter }
    end
  end

  # GET /scope_filters/1/edit
  def edit
    @scope_filter = ScopeFilter.find(params[:id])
  end

  # POST /scope_filters
  # POST /scope_filters.xml
  def create
    @scope_filter = ScopeFilter.new(params[:scope_filter])

    respond_to do |format|
      if @scope_filter.save
        flash[:notice] = 'ScopeFilter was successfully created.'
        format.html { redirect_to(@scope_filter) }
        format.xml  { render :xml => @scope_filter, :status => :created, :location => @scope_filter }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @scope_filter.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /scope_filters/1
  # PUT /scope_filters/1.xml
  def update
    @scope_filter = ScopeFilter.find(params[:id])

    respond_to do |format|
      if @scope_filter.update_attributes(params[:scope_filter])
        flash[:notice] = 'ScopeFilter was successfully updated.'
        format.html { redirect_to(@scope_filter) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @scope_filter.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /scope_filters/1
  # DELETE /scope_filters/1.xml
  def destroy
    @scope_filter = ScopeFilter.find(params[:id])
    @scope_filter.destroy

    respond_to do |format|
      format.html { redirect_to(scope_filters_url) }
      format.xml  { head :ok }
    end
  end
end
